<template>
	<view>
		<view class="cu-list menu">
			<view class="cu-item arrow" @click="go('./updPwd')">
				<view class="content">
					<text class="text-grey">修改密码</text>
				</view>
			</view>
		</view>
		<view class="operation-btn-wrap">
			<button class="cu-btn round bg-white margin-tb-sm lg operation-btn" @tap="logout()">退出登录</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			go(url) {
			   uni.navigateTo({
			   	url
			   })
			},
			logout() {
				uni.showModal({
				    content: '确定要退出登录吗',
				    success: function (res) {
				        if (res.confirm) {
				           uni.removeStorage({key: 'token'});
						   uni.removeStorage({key: 'merchantId'});
				           uni.$emit('userLogin', {isLogin: false});
				           uni.switchTab({url: '/pages/index/index'});
				        }
				    }
				});
			}
		}
	}
</script>

<style>

</style>
